package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SRunBusinessNpc extends Object implements IMessageBase
    {
        public var npcId:int;
        public var itemBuys:Array;
        public var expensiveItemBuys:Array;
        public var itemSells:Array;
        public const _type:int = 100;
        public static var _regist:SRunBusinessNpc = new SRunBusinessNpc(true);

        public function SRunBusinessNpc(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SRunBusinessNpc();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.npcId);
            SeqRunBusinessItemBuyHelper.write(param1, this.itemBuys);
            SeqRunBusinessItemBuyHelper.write(param1, this.expensiveItemBuys);
            SeqRunBusinessItemSellHelper.write(param1, this.itemSells);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.npcId = param1.readInt();
            this.itemBuys = SeqRunBusinessItemBuyHelper.read(param1);
            this.expensiveItemBuys = SeqRunBusinessItemBuyHelper.read(param1);
            this.itemSells = SeqRunBusinessItemSellHelper.read(param1);
            
        }

    }
}
